package com.specter.utils;

import java.util.Date;

import lombok.extern.slf4j.Slf4j;

/**
 * Note:时间相关操作，已经继承 common-lang3
 * 
 * @author Liang.Wang
 * @version 2020-03-30
 */
@Slf4j
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {

    public static Date parse(final String str, final String... patterns) {
        Date date = null;
        try {
            date = parseDate(str, null, patterns);
        } catch (Exception e) {
            log.error("时间格式解析错误！");
            e.printStackTrace();
        }
        return date;
    }
}
